// -----------------------------------------------------------------------------
// Generate By Furion Tools v1.6.0                            
// -----------------------------------------------------------------------------

using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using System;
using System.Collections.Generic;

#nullable disable

namespace iemtm.WeChat.Core
{
    public partial class AnnFee : IEntity<MasterDbContextLocator>, IEntityTypeBuilder<AnnFee, MasterDbContextLocator>
    {

        public int AnnFeeId { get; set; }
        public int AnnounceId { get; set; }
        public string AnnounceCode { get; set; }
        public DateTime? GenStart { get; set; }
        public DateTime? GenStop { get; set; }
        public decimal? EmptyLoadPeriod { get; set; }
        public decimal? LoadPeriod { get; set; }
        public decimal? RunningTotalPeriod { get; set; }
        public decimal? KWpower { get; set; }
        public decimal? Distance { get; set; }
        public decimal? FBPrice { get; set; }
        public decimal? FuelPrice { get; set; }
        public decimal? GenFee2 { get; set; }
        public decimal? GenFeeTax { get; set; }
        public bool IsAuditUpdate { get; set; }
        public decimal? AuditUpdateRunningTotalPeriod { get; set; }
        public string AuditUpdateCode { get; set; }
        public string AuditUpdateName { get; set; }
        public DateTime? AuditUpdateTime { get; set; }
    
        public void Configure(EntityTypeBuilder<AnnFee> entityBuilder, DbContext dbContext, Type dbContextLocator)
        {
                entityBuilder.HasIndex(e => e.AnnounceCode, "IX_AnnounceCode")
                    .IsUnique();

                entityBuilder.HasIndex(e => e.AnnounceId, "Only_AnnounceId")
                    .IsUnique();

                entityBuilder.HasIndex(e => new { e.AnnounceCode, e.AnnounceId }, "Only_IdAndCode")
                    .IsUnique();

                entityBuilder.HasIndex(e => new { e.AnnounceCode, e.AnnounceId }, "select_AnnFee");

                entityBuilder.Property(e => e.AnnounceCode)
                    .IsRequired()
                    .HasMaxLength(50);

                entityBuilder.Property(e => e.AuditUpdateCode).HasMaxLength(50);

                entityBuilder.Property(e => e.AuditUpdateName).HasMaxLength(50);

                entityBuilder.Property(e => e.AuditUpdateRunningTotalPeriod).HasColumnType("decimal(18, 4)");

                entityBuilder.Property(e => e.AuditUpdateTime).HasColumnType("datetime");

                entityBuilder.Property(e => e.Distance).HasColumnType("decimal(18, 4)");

                entityBuilder.Property(e => e.EmptyLoadPeriod).HasColumnType("decimal(18, 4)");

                entityBuilder.Property(e => e.FBPrice).HasColumnType("decimal(18, 4)");

                entityBuilder.Property(e => e.FuelPrice).HasColumnType("decimal(18, 4)");

                entityBuilder.Property(e => e.GenFee2).HasColumnType("decimal(18, 4)");

                entityBuilder.Property(e => e.GenFeeTax).HasColumnType("decimal(18, 4)");

                entityBuilder.Property(e => e.GenStart).HasColumnType("datetime");

                entityBuilder.Property(e => e.GenStop).HasColumnType("datetime");

                entityBuilder.Property(e => e.KWpower).HasColumnType("decimal(18, 4)");

                entityBuilder.Property(e => e.LoadPeriod).HasColumnType("decimal(18, 4)");

                entityBuilder.Property(e => e.RunningTotalPeriod).HasColumnType("decimal(18, 4)");
        }

    }
}

